<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>无标题文档</title>
		<link href="__STATIC__/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
		<!-- Loading Flat UI -->
		<link href="__STATIC__/Flat/dist/css/flat-ui.css" rel="stylesheet">		
		<link href="__STATIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
			.imgtable td {
				text-indent: 0px;
				text-align: center;
				padding: 10px;
			}
			.t_address{
				width: 260px;
			}
		</style>	
		<script type="text/javascript" src="__STATIC__/Admin/js/jquery.js"></script>
		<script language="javascript">
			$(function() {
				//导航切换
				$(".imglist li").click(function() {
					$(".imglist li.selected").removeClass("selected")
					$(this).addClass("selected");
				})
			})
		</script>
		
	</head>

	<body>

		<div class="place">
			<span>位置：</span>
			<ul class="placeul">
				<li><a href="#">订单管理</a></li>
				<li><a href="#">订单管理</a></li>
				<li><a href="#">订单列表</a></li>
			</ul>
		</div>

		<div class="rightinfo">

			<table class="imgtable">

				<thead>
					<tr>
						<th>ID</th>
						<th>订单号</th>
						<th>收货人</th>
						<th class="t_address">收货地址</th>
						<th>联系电话</th>
						<th>合计金额</th>
						<th>下单时间</th>
						<th>状态</th>
						<th>用户</th>
						<th>操作</th>
					</tr>
				</thead>

				<tbody>
					<if value="count($data)==0">
						<tr>
							<td colspan="10" align="center">
								还没有任何订单
							</td>
						</tr>
					<else/>
						<foreach from="$data" key="$k" value="$v">
							<tr>
								<td>{$v.oid}</td>
								<td>{$v.orderNo}</td>
								<td>{$v.recipient}</td>
								<td class="t_address">{$v.address}</td>
								<td>{$v.phoneNo}</td>
								<td>{$v.total}</td>
								<td>{$v.time|date:"Y-m-d h:i:s",@@}</td>
								<td>{$v.status}</td>
								<td>{$v.username}</td>
								<td style="text-align: left;">
									<a href="{|U:'OrderList/Index',array('oid'=>$v['oid'])}" class="tablelink">订单列表</a>
<!--									<a href="{|U:'Edit',array('oid'=>$v['oid'])}" class="tablelink">修改</a>-->
									<if value="$v['status']=='待发货'">
										<a href="{|U:'Cancel',array('oid'=>$v['oid'])}" class="tablelink" onclick="if (!confirm('确认要取消吗？')) return false;" style="color:red">取消</a>
										<a href="{|U:'Finish',array('oid'=>$v['oid'])}" class="tablelink" onclick="if (!confirm('确认已完成吗？')) return false;" style="color:darkgreen;">完成</a>
									</if>
									<if value="$v['status']=='已完成' || $v['status']=='已取消'">
										<a href="{|U:'Del',array('oid'=>$v['oid'])}" class="tablelink" onclick="if (!confirm('确认要删除吗？')) return false;" style="color:red">删除</a>
									</if>
								</td>
							</tr>
						</foreach>
					</if>
				</tbody>
			</table>	
		</div>

		<script type="text/javascript">
			$('.imgtable tbody tr:odd').addClass('odd');
		</script>

	</body>

</html>